package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    /**
     * RestController可以直接返回字符串、数值等数据，也可以返回Html标签*/
    @RequestMapping("/demo1")
    public String demo1() {
        return "<a href='https://www.baidu.com'>一个简单的Java Spring Boot 项目</a>";
    }
}
